package com.hb.core.pojo.flow.dto;

import cn.hutool.core.util.StrUtil;
import com.hb.core.pojo.flow.entity.FlowApprover;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 流程审批人信息, 发起流程之后该表只保存审批人信息
 * </p>
 *
 * @author zhaojk
 * @since 2021-05-27
 */
@Setter
@Getter
public class FlowApproverDTO extends FlowApprover {
    @Override
    public String paramsValid(String... fieldNames) {
        Long nodeId = this.getNodeId();
        if (nodeId == null) {
            return "必须指定审批节点";
        }
        Integer auditResult = this.getAuditResult();
        if (auditResult == null) {
            return "必须选择审批结果";
        }
        String auditOpinion = this.getAuditOpinion();
        if (StrUtil.isEmpty(auditOpinion)) {

        }
        if (auditResult == null) {
            return "必须选择审批结果";
        }
        return null;
    }
}
